const express = require('express')
const dayjs = require("dayjs")
const app = express()
const port = 8000

// http://127.0.0.1:8000   返回hello world
app.get('/', (req, res) => {
  const date = dayjs().format("YYYY-MM-DD HH:mm:ss");
  res.send(date);
})

app.listen(port, () => {
  console.log(`Example app listening at http://localhost:${port}`)
})